#define _CRT_SECURE_NO_WARNINGS
#pragma once
#include "Comm.h"

class ThreadCache
{
public:

	void* FetchFromCentralCache(size_t MemSize);

	
	void* TC4Alloc(size_t PeerSize);

	void TC4DeAlloc(void* ptr, size_t PeerSize);

	

private:
	FreeList _freeList[BucketNum];
	size_t _maxUseNum = 1; 
};

static _declspec(thread) ThreadCache* pTLSThreadCache = nullptr;